//package com.xqq.controller;
//
//import com.xqq.service.MqttService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.concurrent.CompletableFuture;
//
//@RestController
//@RequestMapping("/api/uav")
//public class UavController {
//
//    @Autowired
//    private MqttService mqttService;
//
//    @PostMapping("/start-movement")
//    public String startUavMovement(
//            @RequestParam String sn,
//            @RequestParam double startLat,
//            @RequestParam double startLng,
//            @RequestParam double endLat,
//            @RequestParam double endLng,
//            @RequestParam long durationSeconds) {
//
//        CompletableFuture<Void> future = mqttService.publishMovingUavData(
//                sn, startLat, startLng, endLat, endLng, durationSeconds);
//
//        return "Started sending UAV movement data for SN: " + sn;
//    }
//}
